//
//  LoginViewController.swift
//  first
//
//  Created by safeu on 2017/10/3.
//  Copyright © 2017年 xuyuanyuan. All rights reserved.
//

import UIKit

class LoginViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        let view1 = UIView(frame: CGRect(x: 10, y: 10, width: 280, height: 600))
        view1.backgroundColor = UIColor.blue
        self.view.addSubview(view1)
        print(view1.frame)
        print(view1.bounds)
        print(view1.center)
        
        let view2 = UIView(frame: CGRect(x: 10, y: 10, width: 240, height: 500))
        view2.backgroundColor = UIColor.red
        self.view.addSubview(view2)
        view1.addSubview(view2)
        print(view2.frame)
        print(view2.bounds)
        print(view2.center)
        
        let view3 = UIView(frame: CGRect(x: 10, y: 10, width: 200, height: 400))
        view3.backgroundColor = UIColor.lightGray
        self.view.addSubview(view3)
        view2.addSubview(view3)
        print(view3.frame)
        print(view3.bounds)
        print(view3.center)
        
        let view4 = UIView(frame: CGRect(x: 10, y: 10, width: 160, height: 300))
        view4.backgroundColor = UIColor.green
        self.view.addSubview(view4)
        view2.addSubview(view4)
        print(view4.frame)
        print(view4.bounds)
        print(view4.center)
        
        let view5 = UIView(frame: CGRect(x: 10, y: 10, width: 100, height: 100))
        view3.backgroundColor = UIColor.cyan
        self.view.addSubview(view5)
        view4.addSubview(view5)
        print(view5.frame)
        print(view5.bounds)
        print(view5.center)
        
        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
